import java.util.Scanner;
public class project01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入一个6位整数");
        int numbers = scanner.nextInt();
        System.out.println("加密前的数据：" + numbers);
        int ge = numbers % 10;
        int shi = numbers / 10 % 10;
        int bai = numbers / 100 % 10;
        int qian = numbers / 1000 % 10;
        int wan = numbers / 10000 % 10;
        int shiwan = numbers / 100000 % 10;
        int[] nums = new int[]{shiwan, wan, qian, bai, shi, ge};
        for (int i = 0; i < nums.length; i++) {
            nums[i] += 5;
            nums[i] %= 10;
        }
        int temp;
        for (int i = 0; i < nums.length / 2; i++) {
            temp = nums[i];
            nums[i] = nums[nums.length - 1 - i];
            nums[nums.length-1-i]=temp;
        }
        System.out.println("加密后的数据：");
        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i]);
        }
    }
}